The phrase "to ruin the carpet" means to cause damage or make the carpet dirty, which can be difficult or impossible to fix.